#ifndef FOSC
	#define FOSC    12000000L
#endif


void PWM_Init(void);

extern float radian,radian1,radian_filted ;
extern idata float acc_Y,gyro_X;
extern signed int balan_pwm_ang;
extern signed char R_speed_count,L_speed_count;
extern	float	L_speed,R_speed;

extern idata signed int	R_position,L_position;
extern  idata float speed_diff;
    


sbit Motor_RMB = P3^2;
sbit Motor_LMB = P3^3;
sbit Motor_RMA = P3^5;
sbit Motor_LMA = P3^4;




sbit  PWM_LT = P5^5;
sbit	PWM_RT = P5^4; 

void PWM_Control(signed int motorL, signed int motorR);
void Motor_Speed_Init(void);